package com.eestimate.domain.impl;

import com.eestimate.dao.database.DBObject;
import com.eestimate.domain.Chemical;
import com.eestimate.domain.business.BusinessObjectImpl;
import com.eestimate.domain.business.common.BusinessObjectTypeEnum;
import com.eestimate.domain.business.common.annotations.PersistentBusinessObject;
import com.eestimate.domain.business.common.annotations.PersistentMetadata;
import com.eestimate.valuesobjects.BaseDTO;
import com.eestimate.valuesobjects.ChemicalVo;

@PersistentBusinessObject(type=BusinessObjectTypeEnum.CHEMICAL)
public class ChemicalImpl extends BusinessObjectImpl implements Chemical{
	
	public ChemicalImpl(DBObject dbObject) {
		super(dbObject);
	}

	@PersistentMetadata
	private String cleaningService;
	
	@PersistentMetadata
	private String cleaningArea;
	
	@PersistentMetadata
	private String application;
	
	@PersistentMetadata
	private String proposedBrand;
	
	@PersistentMetadata
	private String proposedChemical;
	
	@PersistentMetadata
	private String dilutionRatio;
	
	@PersistentMetadata
	private String areaCoverage;
	
	@PersistentMetadata
	private String origin;
	
	@PersistentMetadata
	private String certification;
	
	@PersistentMetadata
	private String packing;
	
	@PersistentMetadata
	private String totalAreaCoverage;
	
	@PersistentMetadata
	private String companyUuid;

	@Override
	public String getCleaningService() {
		return cleaningService;
	}

	@Override
	public void setCleaningService(String cleaningService) {
		this.cleaningService = cleaningService;
	}

	@Override
	public String getCleaningArea() {
		return cleaningArea;
	}

	@Override
	public void setCleaningArea(String cleaningArea) {
		this.cleaningArea = cleaningArea;
	}

	@Override
	public String getApplication() {
		return application;
	}

	@Override
	public void setApplication(String application) {
		this.application = application;
	}

	@Override
	public String getProposedBrand() {
		return proposedBrand;
	}

	@Override
	public void setProposedBrand(String proposedBrand) {
		this.proposedBrand = proposedBrand;
	}

	@Override
	public String getProposedChemical() {
		return proposedChemical;
	}

	@Override
	public void setProposedChemical(String proposedChemical) {
		this.proposedChemical = proposedChemical;
	}

	@Override
	public String getDilutionRatio() {
		return dilutionRatio;
	}

	@Override
	public void setDilutionRatio(String dilutionRatio) {
		this.dilutionRatio = dilutionRatio;
	}

	@Override
	public String getAreaCoverage() {
		return areaCoverage;
	}

	@Override
	public void setAreaCoverage(String areaCoverage) {
		this.areaCoverage = areaCoverage;
	}

	@Override
	public String getOrigin() {
		return origin;
	}

	@Override
	public void setOrigin(String origin) {
		this.origin = origin;
	}

	@Override
	public String getCertification() {
		return certification;
	}

	@Override
	public void setCertification(String certification) {
		this.certification = certification;
	}

	@Override
	public String getPacking() {
		return packing;
	}

	@Override
	public void setPacking(String packing) {
		this.packing = packing;
	}

	@Override
	public String getTotalAreaCoverage() {
		return totalAreaCoverage;
	}

	@Override
	public void setTotalAreaCoverage(String totalAreaCoverage) {
		this.totalAreaCoverage = totalAreaCoverage;
	}

	@Override
	public String getCompanyUuid() {
		return companyUuid;
	}

	@Override
	public void setCompanyUuid(String companyUuid) {
		this.companyUuid = companyUuid;
	}
	
	@Override
	public BaseDTO createDTO(){
		ChemicalVo vo = new ChemicalVo();
		
		vo.name				= this.getName();
		vo.type				= this.getType();
		vo.uuid				= this.getUuid();
		
		vo.cleaningService	= this.getCleaningService();
		vo.cleaningArea		= this.getCleaningArea();
		vo.application		= this.getApplication();
		vo.proposedBrand	= this.getProposedBrand();
		vo.proposedChemical	= this.getProposedChemical();
		vo.dilutionRatio	= this.getDilutionRatio();
		vo.areaCoverage		= this.getAreaCoverage();
		vo.origin			= this.getOrigin();
		vo.certification	= this.getCertification();
		vo.packing			= this.getPacking();
		vo.totalAreaCoverage=this.getTotalAreaCoverage();
		vo.companyUuid		= this.getCompanyUuid();
		
		return vo;
	}
	
}
